﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for SimpleObject
/// </summary>
/// 

public class SimpleObject
{
    public int Id { get; set; }
    public string Name { get; set; }
    public string HashKey { get; set; }
}

public class SimpleObjectNameComparer : IEqualityComparer<SimpleObject>
{
    #region IEqualityComparer<SimpleObject>

    public bool Equals(SimpleObject x, SimpleObject y)
    {
        return x.HashKey == y.HashKey;
    }

    public int GetHashCode(SimpleObject obj)
    {
        return obj.HashKey.GetHashCode();
    }

    #endregion
}
